package com.mt.grand.factory.abstracts;

import com.mt.grand.factory.domain.Food;

/**
 * 抽象工厂模式实例
 * Created by Administrator on 2018/3/4 0004.
 */
public class AbstractFactoryTest {

    public static void main(String[] args) {

        DefaultFoodFactory defaultFoodFactory = new DefaultFoodFactory();
        Food apple = defaultFoodFactory.getApple();
        Food orange = defaultFoodFactory.getOrange();

        System.out.println(apple.getName());
        System.out.println(orange.getName());
    }
}
